
const selectionMap = require('./selection/index')
const templateMap = require('./template/index')

function mergeMaps(...maps) {
    return maps.reduce((mergedMap, currentMap) => {
        // 迭代当前 Map 对象的键值对，并添加到 mergedMap 中
        for (let [key, value] of currentMap) {
            mergedMap.set(key, value)
        }
        return mergedMap
    }, new Map())
}

function getMapFn() {
    return mergeMaps(selectionMap, templateMap)
}

module.exports = getMapFn